home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / perfTuning / glprof.notes < prev    next >
Text File  |  1994-08-01  |  4KB  |  104 lines

  1.  
  2. GLprof Notes
  3. ============
  4.  
  5. o GLprof can give estimation of where graphics bottlenecks are
  6.     for tuning the database.
  7.     - will show if views are inherently fill or transform limited
  8.         fill limited: can have more complex geom in LODs
  9.         xform limited: need to simplify or add LODs for small objects
  10.     - will also point out lots of mode changes
  11.     - gives scene statistics, such as number of transformed vertices,
  12.         number of polygons, number of pixels fixed with different modes
  13.     - don't need to relink program or run single process
  14.     - handy define for inserting glprof tags (compile with libglprof.a):
  15.  
  16.     #define GLPROF_TAG(_name) { \
  17.         cmov2i(99999,99999);    \
  18.         glprof_object(_name);   \
  19.     }
  20.  
  21.     cmov is used to move the character position off screen such that
  22.     the charstr in glprof_object() gets clipped, otherwise, it will 
  23.     affect the simulation.
  24.  
  25.     - if used with gldebug, gldebug history output will be annotated because 
  26.      of the charstrs in glprof_object.
  27.  
  28.     - look at GLPTT for more information
  29.     
  30.  
  31. o UI 
  32.   cannot do file redirection on command line (can only do what exec will take)
  33.   "a" key will print all data (mouse click prints data between tags)
  34.   "pass" 
  35.   "view" texture data not recorded but the mode is calculated.
  36.   "texture" 
  37.     - turns texturing on and off for the entire application
  38.     - accounts for total transform time of texture coords.
  39.     - does this account for data bandwidth time???
  40.     - doesn't understand texdef/tevdef/texbind/tevbind or texgen
  41.     - doesn't understand charstr, lrectread/write, mssize; anything not 
  42.     supported will not be printed in the text window
  43.     -  
  44.   GLprof only understands 60HZ monitors
  45.  
  46.  
  47. o CPU
  48.   if IO3 is present host overhead will be calculated, but there will be
  49.   inflation of timing therefore may not be as CPU bound as trace indicates. 
  50.   Highly tuned drawing loops will be affected because IO3 is checked for each
  51.   GL call
  52.   
  53.  
  54. o prof/pixie reference
  55.     IRIS-4D Seried Compiler Guide [#007-0905-030]
  56.  
  57.     o some quick debug/pixie notes
  58.  
  59.         pixie and prof append the pid number to the Counts and Addrs files
  60.  
  61.         use unshared libraries for prof and pixie
  62.  
  63.         run set number of frames and have an auto exit for pixie and prof.
  64.  
  65.         PC sampling - gives runtime average of time spent
  66.                 - compile -p
  67.                 - setenv PROFDIR to directory where you wish to store data 
  68.         files (pid.progname) 
  69.                 - prof progname pid.progname for the proc of interest   
  70.  
  71.         With basic-block counting use  -invocations and -procedures 
  72.                 to see significant routines and
  73.                 where heavily called routines are called from
  74.                 prof -pixie -p -i -clock Nmhz -l
  75.  
  76.         Basic Block Counting - idealized statistics
  77.  
  78.  
  79. o if using Performer pre-draw callbacks on nodes can give out glprof_object 
  80.     tags that then will appear in a glprof trace.
  81.         - this has the disadvantage of turning off sorting which may
  82.             increase the number of mode changes and also the balance of
  83.             bottlenecks in the scene because it may change the drawing order.
  84.         - it has the advantage of giving per-object drawing statistics
  85.             and will say whether or not a specific object was
  86.             fill or transform limited
  87.         
  88.         sample code for traversal that installs/removes the glprof object tags:         /usr/src/Performer/src/pguide/trav.c has example user traversal
  89.                 code and an example that installs and removes glprof callbacks.
  90.         /usr/src/Performer/src/pguide/profile.c uses this traverser:
  91.                 
  92.             if (mode = Shared->glProfTravMode)
  93.             {
  94.                 /* mode = 1 - install glprof tag node callbacks
  95.                  * mode = 0 - remove glprof tag node callbacks
  96.                  */
  97.                 pfNotify(PFNFY_NOTICE, PFNFY_PRINT, 
  98.                     "Doing glprof traversal: %d\n", mode);
  99.                 DoTraversal((pfNode *)scene, DBGT_GLPROF, mode);
  100.                 Shared->doGLProfTrav = 0;
  101.             }
  102.  
  103.  
  104.